// --------------------------------------------------------------------------------------------
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
// 
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
// 
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
// 
// <remarks>
// Generated by IDLImporter from file mozIStorageStatementCallback.idl
// 
// You should use these interfaces when you access the COM objects defined in the mentioned
// IDL/IDH file.
// </remarks>
// --------------------------------------------------------------------------------------------
namespace Gecko
{
	using System;
	using System.Runtime.InteropServices;
	using System.Runtime.InteropServices.ComTypes;
	using System.Runtime.CompilerServices;
	
	
	/// <summary>
    ///-*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    /// vim: sw=2 ts=2 sts=2 expandtab
    /// This Source Code Form is subject to the terms of the Mozilla Public
    /// License, v. 2.0. If a copy of the MPL was not distributed with this
    /// file, You can obtain one at http://mozilla.org/MPL/2.0/. </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("29383d00-d8c4-4ddd-9f8b-c2feb0f2fcfa")]
	public interface mozIStorageStatementCallback
	{
		
		/// <summary>
        /// Called when some result is obtained from the database.  This function can
        /// be called more than once with a different storageIResultSet each time for
        /// any given asynchronous statement.
        ///
        /// @param aResultSet
        /// The result set containing the data from the database.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void HandleResult(mozIStorageResultSet aResultSet);
		
		/// <summary>
        /// Called when some error occurs while executing the statement.  This function
        /// may be called more than once with a different storageIError each time for
        /// any given asynchronous statement.
        ///
        /// @param aError
        /// An object containing information about the error.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void HandleError(mozIStorageError aError);
		
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void HandleCompletion(ushort aReason);
	}
	
	/// <summary>mozIStorageStatementCallbackConsts </summary>
	public class mozIStorageStatementCallbackConsts
	{
		
		// <summary>
        // Called when the statement has finished executing.  This function will only
        // be called once for any given asynchronous statement.
        //
        // @param aReason
        // Indicates if the statement is no longer executing because it either
        // finished (REASON_FINISHED), was canceled (REASON_CANCELED), or
        // a fatal error occurred (REASON_ERROR).
        // </summary>
		public const ushort REASON_FINISHED = 0;
		
		// 
		public const ushort REASON_CANCELED = 1;
		
		// 
		public const ushort REASON_ERROR = 2;
	}
}
